﻿using System.ComponentModel.DataAnnotations;

namespace WAU.DTOs.AppUserModule
{
    /// <summary>
    /// 创建用户的 dto
    /// </summary>
    public class CreateUserDto
    {
        /// <summary>
        /// 验证码
        /// </summary>
        public string VerifyCode { get; set; }

        /// <summary>
        /// 上级用户的id
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        public string UserName { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        public string Password { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [EmailAddress(ErrorMessage = "邮箱地址非法")]
        [Required(ErrorMessage = "密码不能为空")]
        public string Email { get; set; }

        /// <summary>
        /// 微信openid
        /// </summary>
        public string WxOpenId { get; set; }
    }
}
